package com.yh.csx.demo.controller;

import com.yh.csx.bsf.message.sms.SmsProvider;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@Api("短信服务")
@RestController
public class MessageController {
    @Autowired
    private SmsProvider smsProvider;

    @ApiOperation("发送短信")
    @GetMapping("/sendSms")
    public String sendMessage(String phone){
    	
    		smsProvider.sendText(phone, "测试短信，收到请忽略！","CRM");
    	return "";
    }
}
